<%--
    Document   : userPendingTasks
    Created on : Apr 27, 2014, 4:47:58 PM
    Author     : Anton Strack
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="csd" tagdir="/WEB-INF/tags" %>
<%@tag description="Lists the recent activity of the currently logged in user. " pageEncoding="UTF-8"%>
<%@attribute name="pendingTasks" type="java.util.List<csdwa.Task>" %>
<%@attribute name="emptyMessage" required="true"%>
<c:choose>
    <c:when test="${pendingTasks != null && pendingTasks.size() > 0}">

        <c:forEach items="${pendingTasks}" var="task" >
            <li class="list-group-item"><a href="${req.contextPath}?action=view&resource=task&id=${task.id}">${task.getDerivedValue('ActionTypeName')} ${task.getDerivedValue('PostResourceTypeName')}</a> ${task.name}</li>
            </c:forEach>
        </c:when>
        <c:otherwise>
        <li class="list-group-item">${emptyMessage}</li>
        </c:otherwise>
    </c:choose>

